<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>

</head>
<body>
        <input type="checkbox" value="1" name="check" checked="checked">1
        <input type="checkbox" value="2" name="check"  />2
        <input type="checkbox" value="3" name="check" checked="checked" />3
        <input type="checkbox" value="4" name="check"   />4
    <script>
      //  遍历checkbox控件，输出选中个数"
   function jq() {
        var value=[];
        $('input[name="check"]:checked').each(function () {
            value.push( $(this).val())
        })
        alert(value)
   }

    </script>



<table id="tab">
	<tbody>
		<tr>
			<td>第一行</td>
		</tr>
		<tr>
			<td>第二行</td>
		</tr>
		<tr>
			<td>第三行</td>
		<tr>
			<td>第四行</td>
		</tr>
		<tr>
			<td>第五行</td>
		</tr>
	</tbody>
</table>

<script>
    //设置表格序号为偶数行的文本颜色

    $(document).ready(function () {
        $("#tab tr:odd").css("background-color","red");
        // $("#tab tr:even").css("background-color","blue")
    })


</script> 


   
</body>
</html>